The Usage
From Documentation
This documentation is for an older version of ZK. For the latest one, please click here.
The zk_page and zk_richlet Parameter and Attribute
ZK portlet loader is a generic loader. To load a particular ZUML page, you have to specify either a request parameter, a portlet attribute or a portlet preference called zk_page
, if you want to load a ZUML page, or zk_richlet
, if you want to load a richlet.
More precisely, ZK portlet loader first checks the following locations for the path of the ZUML page or the richlet. The lower the number, the higher the priority.
- The request parameter (
RenderRequest
'sgetParameter
) calledzk_page
. If found, it is the path of the ZUML page. - The request attribute (
RenderRequest
'sgetAttribute
) calledzk_page
. If found, it is the path of the ZUML page. - The request preference (
RenderRequest
'sgetPortletPreferences
'sgetValue
) calledzk_page
. If found, it is the path of the ZUML page. - The request parameter (
RenderRequest
'sgetParameter
) calledzk_richlet
. If found, it is the path of the richlet. - The request attribute (
RenderRequest
'sgetAttribute
) calledzk_richlet
. If found, it is the path of the richlet. - The request preference (
RenderRequest
'sgetPortletPreferences
'sgetValue
) calledzk_richlet
. If found, it is the path of the richlet. - The initial parameter (
PortletConfig
'sgetInitParameter
) calledzk_page
. If found, it is the path of the ZUML page.
Examples
How to pass a request parameter or attribute to a portlet depends on the portal. You have to consult the user's guide of your favorite portal for details. The following is an example that uses Potix Portal.
<layout contentType="text/html">
<title>ZK Portlet Demo</title>
<header name="Cache-Control" value="no-cache"/>
<header name="Pragma" value="no-cache"/>
<vbox>
<hbox>
<servlet page="sample1.zul"/>
<portlet name="zkdemo.zkLoader">
<attribute name="zk_page" value="/test/sample2.zul"/>
</portlet>
</hbox>
</vbox>
<molds uri="~./pxp/html/molds.xml"/>
</layout>